← Back

Focus Ring

[basic]

Accessibility focus ring indicators

Focus Ring Demo

Accessibility focus ring indicators

For the full interactive experience:

$ mix raxol.playground

Code
items =
  @items
  |> Enum.with_index()
  |> Enum.map(fn {label, idx} ->
    if idx == model.focused do
      rendered = FocusRing.render(label, model.ring_config)
      text(rendered, fg: :cyan)
    else
      text("  #{label}  ", style: [:dim])
    end
  end)
demo j/k prev/next / focus demo esc back 32/42 demos